#pragma once
#include <string>
#include <vector>


class KMPString
{
public:
	KMPString();
	KMPString(std::string& src,std::string& tar,int& pos);
	void setSource(std::string& src);
	void setTarget(std::string& tar);
	int getPos();
	int getPos(std::string& tar);
private:
	void getNext();
	std::string mSource;
	std::string mTarget;
	std::vector<int> mNext;
	int pos;
};

